let _pathOne = document.getElementById('path-1');
let _pathTwo = document.getElementById('path-2');
let loadingText = document.getElementById('loading-text');
let i = 1;
let bg = true;

setInterval(function() {
	set();
},10);

setInterval(function() {
	
	setText();
},1000);


function set() {
	let angle = i * 2;
	_pathOne.setAttribute('transform', 'rotate('+ (i * 2) +' 120,120)');
	_pathTwo.setAttribute('transform', 'rotate('+ (120 + (i * 2)) +' 120,120)');
	i++;
}

function setText() {
	if(bg) {
		loadingText.setAttribute('fill','grey');
	} else {
		loadingText.setAttribute('fill','#333');
	}
	
	bg = !bg;
	
}